class TimeItem {
  final String name;
  final int num;

  TimeItem({
    required this.name,
    required this.num,
  });

  factory TimeItem.fromJson(Map<String, dynamic> json) {
    return TimeItem(
      name: json['name'] as String,
      num: json['num'] as int,
    );
  }
}

class FilterData {
  final List<String> tags;
  final List<TimeItem> times;

  FilterData({
    required this.tags,
    required this.times,
  });

  factory FilterData.fromJson(Map<String, dynamic> json) {
    return FilterData(
      tags: (json['tags'] as List<dynamic>).map((e) => e as String).toList(),
      times: (json['times'] as List<dynamic>)
          .map((e) => TimeItem.fromJson(e as Map<String, dynamic>))
          .toList(),
    );
  }
}
